package Vista;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import Controlador.Sistema;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class BajaPlanBase extends javax.swing.JFrame {
	public static String TITLE = "Baja de Plan Base";
	/**
	* Auto-generated main method to display this JFrame
	*/
	private Sistema sistema;
	private JButton jBtnGrabar;
	private JTextField jTxtNumero;
	private JLabel jLblNumero;
	
	public BajaPlanBase(Sistema s) {
		// TODO Auto-generated constructor stub
		super(TITLE);
		sistema=s;
		initGUI();
	}

	private void initGUI() {
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		getContentPane().setLayout(null);
		this.setSize(365, 172);
		{
			jLblNumero = new JLabel();
			getContentPane().add(jLblNumero);
			jLblNumero.setText("Numero");
			jLblNumero.setBounds(30, 37, 97, 16);
		}
		{
			jTxtNumero = new JTextField();
			getContentPane().add(jTxtNumero);
			jTxtNumero.setBounds(157, 34, 157, 23);
		}
		{
			jBtnGrabar = new JButton();
			getContentPane().add(jBtnGrabar);
			jBtnGrabar.setText("Borrar");
			jBtnGrabar.setBounds(97, 94, 154, 23);
			jBtnGrabar.addActionListener(new ActionListener() {

				@Override
				public void actionPerformed(ActionEvent arg0) {
					// TODO Auto-generated method stub
					sistema.borrarPlanPB(Integer.parseInt(jTxtNumero.getText()));
				}
			});
		}
}

}
